#函数返回值
# def func():
#     return 6666
# print(func())

# def func(a):
#     return a+10
#
# print(func(2))

# def func():
#     return [1,True,(11,22,33)]
#
# result = func()
# print(result)

# def func():
#     value = 1 + 1
# ret = func()
# print(ret)  # None


#当函数没有return 或者return 或者return None 的时候，返回值都是None
# def func():
#     return
# def func1():
#     return None
# def func2():
#     pass
# print(func())
# print(func1())
# print(func2())

#return 后面的值如果有逗号，则会先转化为元组再返回
# def func():
#     return 1,3,5,7
# print(func(),type(func()))


#return 可以提早结束函数的运行或结束循环
# def func():
#     print("开始")
#     for i in range(1,10):
#         if i%2==0:
#             print(i)
#         else:
#             return
#     print("结束")
# func()
#

# def func():
#     print("开始")
#     for i in range(1,10):
#         if i%2==0:
#             print(i)
#         else:
#             break
#     print("结束")
# func()
# def func():
#     print("开始")
#     for i in range(1,10):
#         if i%2==0:
#             print(i)
#         else:
#             continue
#     print("结束")
# func()
# def func():
#     print("开始")
#     for i in range(1,10):
#         if i%2==0:
#             print(i)
#     print("结束")
# func()

def func():
    """
    返回值
    :return:
    """
    print("开始")
    for i in range(1,10):
        if i%2==0:
            print(i)
        else:
            pass
    print("结束")
func()

